package jok.decorator;

public class WriterDecorator extends Writer {

	private Writer writer;

	public WriterDecorator(Writer writer) {
		this.writer = writer;
	}

	private void bufferedWrite() {
		System.out.println("加入高效缓冲区");
	}

	@Override
	public void write() {
		this.bufferedWrite();
		writer.write();
	}
}
